package cn.jiyun.service.fegin;

import cn.jiyun.entity.day12.ContestDTO;
import cn.jiyun.entity.day12.ContestVO;
import cn.jiyun.entity.day9.Course;
import cn.jiyun.entity.day9.CourseDTO;
import cn.jiyun.entity.day9.CourseVO;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("day9-course")
public interface CourseFeginService {
//查询所有课程信息
    @GetMapping("/course/list")
    List<Course> list();
//根据id查询一个课程的信息
    @GetMapping("/course/selectOne")
    Course selectOne(@RequestParam("cid") String cid);
/*
 * @description:
 * @author: sjt
 * @date: 2023/8/31 11:07
 * @param: []
 * @return: java.util.List<cn.jiyun.entity.day9.CourseVO>
 * @annotate:返回最新的四个课程
**/
    @GetMapping("/course/findNewFourCourse")
    List<CourseVO> findNewFourCourse();

/*
 * @description:
 * @author: sjt
 * @date: 2023/8/31 11:09
 * @param: [dto]
 * @return: java.util.List<cn.jiyun.entity.day9.CourseVO>
 * @annotate:根据查询条件/返回全部的课程信息
**/
    @PostMapping("/course/findCourseList")
    List<CourseVO> findCourseList(@RequestBody CourseDTO dto);



//    @GetMapping("/course/findCourseXueNum")
//    Integer findCourseXueNum(@RequestParam("cid") Integer cid);
}
